package cn.com.bianguo.java.plugindemo.pluginmessagetencent;

import cn.com.bianguo.java.plugindemo.pluginimpl.IMessagePlugin;
import org.pf4j.Extension;
import org.pf4j.Plugin;

public class TencentPlugin extends Plugin {

    @Override
    public void start() {
        super.start();
        System.out.println("TencentPlugin start");
    }

    @Override
    public void stop() {
        super.stop();
        System.out.println("TencentPlugin stop");
    }

    @Extension
    public static class TencentMessage implements IMessagePlugin {

        @Override
        public int pluginType() {
            return 2;
        }

        @Override
        public void sendMsg(String msg) {
            System.out.println("tencent yun send msg : " + msg);
        }
    }
}
